<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增蓝牙设备管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bluetooth-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">MAC地址：</label>
                <div class="col-sm-8">
                    <input name="mac" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">小区：</label>
                <div class="col-sm-8">
<!--                    <input name="districtId" class="form-control" type="text" required>-->
                    <select id="districtId" class="form-control" name="districtId"  data-none-selected-text="请选择小区" th:with="MetaList=${@common.districtList()}">
                        <option value="">所有</option>
                        <option th:each="Meta : ${MetaList}" th:text="${Meta.name}"
                                th:value="${Meta.id}"></option>
                    </select>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">门岗：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="gateId" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="text">
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">类型：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <select name="type" class="form-control m-b">-->
<!--                        <option value="">所有</option>-->
<!--                    </select>-->
<!--                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
<!--                </div>-->
<!--            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "djb/bluetooth"
        $("#form-bluetooth-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-bluetooth-add').serialize());
            }
        }
    </script>
</body>
</html>